package com.qk.management.mapper;

import com.qk.entity.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DeptMapper {
    @Insert("insert into dept(name,status,create_time,update_time) values(#{name},#{status},#{createTime},#{updateTime})")
    void insert(Dept dept);

    List<Dept> list(
            @Param("name") String name,
            @Param("status") Integer status);

    Dept getDeptById(@Param("id") Integer id);

    void update(Dept dept);

    @Delete("delete from dept where id=#{id}")
    void delete(Integer id);

    @Select("select * from dept where status=1")
    List<Dept> select();
}